<template>
    <div>
        <button @click="handleClick">返回上一级页面</button>
        <div>Detail</div>
    </div>
</template>

<script>
import { inject, onMounted } from 'vue';

export default {
    setup() {
        const show = inject("show")
        const which = inject("which")

        onMounted(() => {
            show.value = false
        })

        const handleClick = () => {
            which.value = "List"
            show.value = true
        }

        return {
            handleClick
        }
    },
}
</script>